/*
 * $Id$
 */
package corejs.parser;


import static corejs.JsTokenType.*;
import corejs.Token;
import corejs.expr.Expression;
import corejs.expr.InvocationExpr;
import corejs.expr.SequenceExpr;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author myang
 */
public class InvocationParser implements InfixParser {

   @Override
   public Expression expr(final PrattParser parser, 
                          final Expression left, final Token tk) {
      return new InvocationExpr(left, parser.matchAndParse(RIGHT_PAREN));
   }

   @Override
   public int getPrecedence() {
      return Precedence.CALL;
   }
   
}
